<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>创建Persion对象</title>
		<style>
			#info{
				border: 1px solid red;
			}
		</style>
	</head>
	<body>
	<div id="info"></div>
		<!--<script>
			var persion=new Object();
			persion.name="小明";
			persion.age="25";
			persion.work="中国内地男歌手、演员";
			persion.add="中国北京海淀区";
			var st="姓名："+persion.name+"<br/>年龄 ："+persion.age+"<br/>工作："+persion.work
			+"<br/>住址："+persion.add;
			document.getElementById("info").innerHTML=st;
		</script>-->
		<script>
			var persion=new Object();
			persion.name="小明";
			persion.age="25";
			persion.work="中国内地男歌手、演员";
			persion.add="中国北京海淀区";
			persion.show=function(){
				document.write("姓名为："+this.name+"<br />年龄为："+this.age+"<br />工作:"
				+this.work+"<br />地址："+this.add)
			}
			persion.show();
		</script>
		
	</body>
</html>
